﻿@model Ninesky.Web.Models.CategoryGeneralViewModel

@{
    ViewData["Title"] = "添加栏目";
}
<ol class="breadcrumb">
    <li><span class="glyphicon glyphicon-home"></span> <a asp-action="Index" asp-controller="Home">首页</a></li>
    <li><a asp-action="Index" asp-controller="Category">栏目管理</a></li>
    <li class="active">添加栏目</li>
</ol>
<h3><span class="glyphicon glyphicon-plus"></span> 添加栏目</h3>

<hr />
<div class="row">
    <div class="col-md-4">
        <form asp-action="Create">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>

            @*<div class="btn-group">
                    <input type="text" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" />
                    <ul class="dropdown-menu">
                        <li><a href="#">Action</a></li>
                        <li><a href="#">Another action</a></li>
                        <li><a href="#">Something else here</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">Separated link</a></li>
                    </ul>
                </div>*@

            <div class="form-group">
                <label asp-for="ParentId" class="control-label"></label><div style="position:relative">
                    <input asp-for="ParentId" class="form-control dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" />
                    <ul class="dropdown-menu">
                        <li><a id="aa" href="#">Action</a></li>
                        <li><a href="#">Another action</a></li>
                        <li><a href="#">Something else here</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">Separated link</a></li>
                    </ul>
                </div>
                <span asp-validation-for="ParentId" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Order" class="control-label"></label>
                <input asp-for="Order" class="form-control" />
                <span asp-validation-for="Order" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Name" class="control-label"></label>
                <input asp-for="Name" class="form-control" />
                <span asp-validation-for="Name" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Description" class="control-label"></label>
                <input asp-for="Description" class="form-control" />
                <span asp-validation-for="Description" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Meta_Keywords" class="control-label"></label>
                <textarea asp-for="Meta_Keywords" class="form-control"></textarea>
                <span asp-validation-for="Meta_Keywords" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Meta_Description" class="control-label"></label>
                <textarea asp-for="Meta_Description" class="form-control"></textarea>
                <span asp-validation-for="Meta_Description" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="HomeTemplate" class="control-label"></label>
                <input asp-for="HomeTemplate" class="form-control" />
                <span asp-validation-for="HomeTemplate" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="ContentType" class="control-label"></label>
                <select asp-for="ContentType" asp-items="Html.GetEnumSelectList(typeof(Ninesky.Models.ContentType))" class="form-control"></select>
                <span asp-validation-for="ContentType" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="ListTemplate" class="control-label"></label>
                <input asp-for="ListTemplate" class="form-control" />
                <span asp-validation-for="ListTemplate" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="ContentTemplate" class="control-label"></label>
                <input asp-for="ContentTemplate" class="form-control" />
                <span asp-validation-for="ContentTemplate" class="text-danger"></span>
            </div>
            <div class="form-group">
                <input type="submit" value="保存" class="btn btn-default" />
            </div>
        </form>
    </div>
</div>


@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
    <script type="text/javascript">
        //$("#ParentId").click(function () { $(".dropdown-menu").show(); });
        $("#aa").click(function () {
            alert("2");
            $("#ParentId").val("1");
        });
    </script>
}
